package com.candy.service.impl;

import com.candy.bean.UserInfo;
import com.candy.dao.UserInfoMapper;
import com.candy.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LoginServiceImpl implements LoginService {

    @Autowired
    UserInfoMapper userInfoMapper;

    @Override
    public boolean login(UserInfo userInfo) {
      List<UserInfo> lsuser= userInfoMapper.selectByLogin(userInfo);
      if (lsuser!=null && lsuser.size()>0){
          return true;
      }else {
          return false;
      }
    }
}
